<template>
  <a-select
    :options="options"
    :show-search="showSearch"
    :filter-option="filterOption"
    :placeholder="placeholder"
    v-model:value="value"
  ></a-select>
</template>
<script setup lang="ts">


import type { options } from "@/types";

const props = defineProps({
  options: {
    default: [] as options[],
  },
  showSearch: {
    default: true,
  },
  placeholder: {
    default: "搜索" as string,
  },
});
const value = defineModel({
  default: "" as any,
})
const filterOption = (input: string, option: any) => {
  return option.label.indexOf(input) >= 0;
};
</script>
<style scoped lang="less"></style>
